package com.panshi.service;

import com.panshi.entity.AppAnswer;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Component
//@FeignClient(value="ANSWER-APi", fallbackFactory = AnswerClientFallbackFactory.class) // 服务名称，服务降级的备选处理类
@FeignClient(value="hasbei-answer-provider")
public interface FeignAnswerApiClient {

    @GetMapping("/matter/byMid/{matterId}") // 服务提供端路径
    public List<AppAnswer> queryAnswerByMid(@PathVariable Integer matterId);

    @GetMapping("/matter/updatePt/{answerId}/{code}")
    public void updatePariseTread(@PathVariable Integer answerId, @PathVariable String code);


}
